package com.pc.admin.config.dev.test;

import com.pc.admin.annotation.Limiting;
import com.pc.admin.util.CommonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class ControllerDev {

    @GetMapping("/test")
    @Limiting(target = Limiting.Target.IP,num = 4)
    public CommonResult test(){
        log.info("1");
        log.warn("1");
        log.error("1");
        return CommonResult.ok();
    }
    @Limiting(target = Limiting.Target.EL,num = 4,spEl = "#uid")
    @GetMapping("/testt")
    public CommonResult testt(String uid){
        log.info("1");
        log.warn("1");
        log.error("1");
        return CommonResult.ok();
    }

}
